package com.hxkj.file.utils;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class JsonUtils {
    /**
     * @return $
     * @throws
     * @author mojiayi
     * @date $ $$params$
     * @since
     */
    public static String readFile(InputStream fin) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(fin));
        StringBuffer sb = new StringBuffer();

        String line;
        while ((line = br.readLine()) != null) {
            sb.append(line);
        }

        br.close();
        return sb.toString();
    }
}
